package com.baselibrary.test.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.baselibrary.libs.View.bar.initAction_Bar;
import com.baselibrary.libs.View.defined.defined_viewpager.Defined_ViewPager;
import com.baselibrary.libs.View.defined.defined_viewpager.fragment.Fragment_item_01;
import com.baselibrary.libs.View.defined.defined_viewpager.fragment.Fragment_item_02;
import com.baselibrary.libs.View.defined.defined_viewpager.fragment.Fragment_item_03;
import com.baselibrary.libs.View.defined.defined_viewpager.fragment.Fragment_item_04;
import com.baselibrary.libs.base.baseActivity.BaseFragmentActivity;
import com.baselibrary.libs.example.example_viewpager_fragment.view.MyViewPagerAdapter;
import com.baselibrary.test.R;

import java.util.ArrayList;

public class viewpager_fragment_pull_01 extends BaseFragmentActivity {

    private Defined_ViewPager mViewPager;
    private initAction_Bar action_bar;
    private MyViewPagerAdapter mAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_viewpager_fragment_01;
    }

    @Override
    public void initView() {
        action_bar = (initAction_Bar)findViewById(R.id.action_bar);

        mViewPager = (Defined_ViewPager)findViewById(R.id.defined_ViewPager);


        action_bar.set_Title("viewPage1");
        initData();
    }

    @Override
    public void initP() {

    }

    @Override
    public void initData() {
        Fragment_item_01 item_01 = new Fragment_item_01();
        Fragment_item_02 item_02 = new Fragment_item_02();
        Fragment_item_03 item_03 = new Fragment_item_03();
        Fragment_item_04 item_04 = new Fragment_item_04();
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(item_01);
        fragments.add(item_02);
        fragments.add(item_03);
        fragments.add(item_04);
        mViewPager.setData(getSupportFragmentManager(),fragments);

    }

    @Override
    public void initListener() {

    }
}
